<tr>
    <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="4" class="shadowleft"><img src="/templates/images/space.gif" width="4" height="1"></td>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                                <tr>
                                    <td bgcolor="#000000">
                                        <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td width="444">
                                                        <a href="/" target="_self">
                                                            <img src="/templates/images/bannertop.jpg" width="444" height="116">
                                                        </a>
                                                    </td>
                                                    <td valign="top" style="padding-right:10px; padding-top:10px; padding-bottom:15px;">
                                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td class="fontw">
                                                                        <div align="right">Hôm nay: 
                                                                            <script language="JavaScript1.2">
                                                                                <!-- Begin
                                                                                var months=new Array(13);
                                                                                months[1]="tháng 1";
                                                                                months[2]="tháng 2";
                                                                                months[3]="tháng 3";
                                                                                months[4]="tháng 4";
                                                                                months[5]="tháng 5";
                                                                                months[6]="tháng 6";
                                                                                months[7]="tháng 7";
                                                                                months[8]="tháng 8";
                                                                                months[9]="tháng 9";
                                                                                months[10]="tháng 10";
                                                                                months[11]="tháng 11";
                                                                                months[12]="tháng 12";
                                                                                var time=new Date();
                                                                                var date=time.getDate();
                                                                                var lmonth=months[time.getMonth() + 1];
                                                                                var year=time.getYear();
                                                                                if (year < 2000)    // Y2K Fix, Isaac Powell
                                                                                    year = year + 1900; // Phong Cach So Co., Ltd
                                                                                document.write("<right>" + "Ngày " + date + ",");
                                                                                document.write(" " + lmonth + ", năm " + year + "</right>");
                                                                                // End -->
                                                                            </script>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="fontw">
                                                                        <div align="right">
                                                                            <table border="0" align="right" cellpadding="2" cellspacing="0">
                                                                                <tbody>
                                                                                    <tr>
                                                                                        <!-- if $session != null -->
																						{if $user_loginned != 'none'}

                                                                                            <td>
                                                                                                <a href="/profileuser" class="linkmn">Xin chào {$session}</a>
                                                                                            </td>

                                                                                            <td>
                                                                                                <div align="center">
                                                                                                    <img src="/templates/images/line_w.jpg" width="1" height="8">
                                                                                                </div>
                                                                                            </td>
                                                                                            {if $user_loginned == "staff" || $user_loginned == 'admin'}
																								{if $user_loginned_staff == "ketoan"}
																									<td>
																										<a href="/admin/order" class="linkmn">Quản trị</a>
																									</td>
																								{else}
																									<td>
																										<a href="/admin/product" class="linkmn">Quản trị</a>
																									</td>
																								{/if}
                                                                                            {else}
                                                                                                <td>
                                                                                                    <a href="/listorder" class="linkmn">Đơn hàng</a>
                                                                                                </td>
                                                                                            {/if}    
                                                                                            <td>
                                                                                                <div align="center">
                                                                                                    <img src="/templates/images/line_w.jpg" width="1" height="8">
                                                                                                </div>
                                                                                            </td>
                                                                                            <td>
                                                                                                <a href="/logout" class="linkmn">Thoát</a>
                                                                                            </td>
                                                                                        {else}
                                                                                            <td>
                                                                                                <a href="/login" class="linkmn">Đăng nhập</a>
                                                                                            </td>

                                                                                            <td>
                                                                                                <div align="center">
                                                                                                    <img src="/templates/images/line_w.jpg" width="1" height="8">
                                                                                                </div>
                                                                                            </td>
                                                                                            <td>
                                                                                                <a href="/register" class="linkmn">Đăng ký</a>
                                                                                            </td>
                                                                                        {/if}
                                                                                    </tr>
                                                                                </tbody>
                                                                            </table>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td height="35">&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <table border="0" align="right" cellpadding="2" cellspacing="0">

                                                                            <script language="JavaScript" type="text/javascript">
                                                                                function getidsubcat(t)
                                                                                 {
                                                                                     document.frmSearch.s_idcatsub.value=t.value;
                                                                                 }
                                                                                 function GotoSubmit()
                                                                                 {
                                                                                 document.frmSearch.submit()
																			 }
																			</script>

																			<script>
																		function getXMLHTTP() { //fuction to return the xml http object
																		var xmlhttp=false;	
																		try{
																		xmlhttp=new XMLHttpRequest();
																	}
																	catch(e){		
																	try{			
																	xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
																}
																catch(e){
																try{
																xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
															}
															catch(e1){
															xmlhttp=false;
														}
													}
												}
												return xmlhttp;
											}   

											function getsubcat(strURL) {		
											var req = getXMLHTTP();
											if (req) {
											req.onreadystatechange = function() {
											if (req.readyState == 4) {
											// only if "OK"
											if (req.status == 200) {						
											document.getElementById('subcatdiv').innerHTML=req.responseText;						
										} else {
										alert("There was a problem while using XMLHTTP:\n" + req.statusText);
									}           
								}				
							}              			
							req.open("GET", strURL, true);
							req.send(null);
						}

					}
                                                                            </script>

                                                                            <form action="/search" name="frmSearch" enctype="multipart/form-data" method="POST" style="margin:0; padding:0;">
																				<tbody>
																					<tr>
																						<td width="95">
																							<div id="subcatdiv">
																								<select id="search_category" name="search_category" class="box_input_search">
																									<option value="0">Nhà sản xuất</option>
																									{foreach from=$category item=category_item}
																										<option value="{$category_item.idcategory}" {if isset($smarty.session.search_category) && $smarty.session.search_category ==  $category_item.idcategory}selected="selected"{/if}>
																											{$category_item.categoryname}
																										</option>
																									{/foreach}
																								</select>
																							</div>
																						</td>
																						<td width="70">
																							<select name="search_price" id="search_price" class="box_input_search">
																								<option value="0" {if isset($smarty.session.search_price) && $smarty.session.search_price == 0}selected="selected"{/if}>Giá</option>
																								<option value="1" {if isset($smarty.session.search_price) && $smarty.session.search_price == 1}selected="selected"{/if}>&lt;1 triệu</option>
																								<option value="2" {if isset($smarty.session.search_price) && $smarty.session.search_price == 2}selected="selected"{/if}>1-3 triệu</option>
																								<option value="3" {if isset($smarty.session.search_price) && $smarty.session.search_price == 3}selected="selected"{/if}>3-5 triệu</option>
																								<option value="4" {if isset($smarty.session.search_price) && $smarty.session.search_price == 4}selected="selected"{/if}>5-8 triệu</option>
																								<option value="5" {if isset($smarty.session.search_price) && $smarty.session.search_price == 5}selected="selected"{/if}>8-12 triệu</option>
																								<option value="6" {if isset($smarty.session.search_price) && $smarty.session.search_price == 6}selected="selected"{/if}>12-20 triệu</option>
																								<option value="7" {if isset($smarty.session.search_price) && $smarty.session.search_price == 7}selected="selected"{/if}>&gt;20 triệu</option>
																							</select>
																						</td>
																						<td width="100">
																							<input type="text" name="search_productname" id="search_productname" class="box_input_search" 
																								   value="{if isset($smarty.session.search_productname)}{$smarty.session.search_productname}{/if}"
																								   style="text-indent: 5px;">
																						</td>
																						<td style="padding-left:10px;">
																							<div align="right">
																								<input type="hidden" id="submit_search" name="submit_search" value="submit">
																								<a href="#" class="linkmn" onclick="GotoSubmit()">Tìm kiếm</a>

																							</div>
																						</td>
																					</tr>
																				</tbody>
																			</form>

                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bgmenu">
                                        <table border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/'}on{else}off{/if}'">
                                                        <a href="/" class="linkmn">TRANG CHỦ</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/product'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/product'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/product" class="linkmn">SẢN PHẨM</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/introduce'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/introduce'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/introduce" class="linkmn">GIỚI THIỆU</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/article'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/article'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/article" class="linkmn">TIN TỨC</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/promotion'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/promotion'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/promotion" class="linkmn">KHUYẾN MÃI</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/download'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/download'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/download" class="linkmn">DOWNLOAD</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/contact'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/contact'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/contact" class="linkmn">LIÊN HỆ</a>
                                                    </td>
                                                    <td width="2">
                                                        <img src="/templates/images/menu_line.jpg">
                                                    </td>
                                                    <td class="{if $smarty.server.REQUEST_URI == '/cart'}on{else}off{/if}" onmouseover="this.className='on'" onmouseout="this.className='{if $smarty.server.REQUEST_URI == '/cart'}on{else}off{/if}'" onclick="mClk_topmn(this)">
                                                        <a href="/cart" class="linkmn">GIỎ HÀNG ({$quantity_cart_product})</a>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                    <td width="4" class="shadowright">
                        <img src="/templates/images/space.gif" width="4" height="1">
                    </td>
                </tr>
            </tbody>
        </table>
    </td>
</tr>